<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
  <script>
      // 禁止右键菜单
      document.oncontextmenu = function(){ return false; };
      // 禁止文字选择
      document.onselectstart = function(){ return false; };
      // // 禁止复制
      // document.oncopy = function(){ return false; };
      // // 禁止剪切
      // document.oncut = function(){ return false; };
      // // 禁止粘贴
      // document.onpaste = function(){ return false; };
      // 监听手机退出
      document.addEventListener('plusready', function (a) {
          var first = '';
          plus.key.addEventListener('backbutton', function () {
              //获取地址栏目中的url
              var urls = location.hash.split('/')[1]
              if (urls === 'login' || urls === '') { // 判断是首页的时候点击二次退出app
                  if (new Date().getTime() - first < 3000) {
                      // console.log("关闭程序")
                      plus.runtime.quit();
                  } else {
                      // mui.toast("再按一次退出应用");//自定义的弹窗
                      first = new Date().getTime();
                  }
              } else {
                  history.go(-1)
              }
          }, false);
      });
  </script>
</html>
